-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing interfaces & context class structure for portal metadata #1033
base: main
Are you sure you want to change the base?
Conversation
export class PortalMetadataContext { | ||
|
||
private portalMetadata: IPortalMetadata; | ||
private portalMetadataContext: IContextItem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an array right?
adx_registerstartupscript?: string; | ||
} | ||
|
||
export interface IContextItem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets rename this to IPortalMetaDataContext
private portalMetadataContext: IContextItem; | ||
|
||
|
||
public getPortalMetadataContext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets have a set funciton for initilization here - also this should be a singleton class -check WebExtensionContext for referecen
// updates portalMetadataContext | ||
} | ||
|
||
private updatePortalMetadata() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need get/set for portalMetadata too in addtion to update. Moreover update should target at more granular updates and not entire list reset
// updates portalMetadata | ||
} | ||
|
||
private createPortalMetadataContext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create is not the right terminology - lets use get/set/update for both of these members and use singleton class as suggested above.
This pull request introduces context for portal metadata by adding interfaces and a context class. The most important changes include defining interfaces for portal metadata and introducing a class to manage this metadata. It methods will be further implemented.
Portal Metadata Interfaces:
src/common/portal-metadata-context/Interfaces.ts
: Added interfaces for various portal metadata entities, such asIPortalMetadata
,IWebsite
,IPageTemplate
,IWebFile
,IContentSnippet
,IWebTemplate
,IWebpage
,IEntityList
,IWebForm
, andIEntityForm
. These interfaces define the structure and types of data used in the portal metadata & its context.Portal Metadata Context Class:
src/common/portal-metadata-context/PortalMetadataContext.ts
: Introduced thePortalMetadataContext
class, which includes methods for managing portal metadata and its context. This class provides methods to get, update, and create portal metadata and its context.